home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Atari Mega Archive 1
/
Atari Mega Archive - Volume 1.iso
/
mint
/
lib
/
mntlib44.zoo
/
mntlib
/
fopenp.c
< prev
next >
Wrap
C/C++ Source or Header
|
1994-01-16
|
482b
|
25 lines
/* open a file, searching along the PATH environment variable for it */
/* rehacked by Uwe Ohse, 3.5.93: uses buffindfile now */
#include <stdio.h>
#include <errno.h>
#include <stdlib.h>
#include <limits.h>
#include <support.h>
FILE *
fopenp(name, mode)
const char *name, *mode;
{
char *fullname;
char buffer[PATH_MAX];
fullname = _buffindfile(name, getenv("PATH"), (char **)0, buffer);
if (!fullname) {
errno = ENOENT;
return NULL;
}
return fopen(fullname, mode);
}